-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
benchmarks: Implement benchmarks for streamable #10388
benchmarks: Implement benchmarks for streamable #10388
Conversation
b292fc4
to
58240e2
Compare
Very cool. I suggest naming the file bench_streamable so when we search for filenames we don't get duplicates with ide. Also it would be nice to have the avg ms time for each iteration |
I don't care that much and i can rename if you really want it but isn't that what folders and packages are about? We also have
Not sure if i understand what you mean exactly. What it currently prints as result is chia-blockchain/benchmarks/streamable.py Line 187 in 58240e2
|
It's personal preference, I like to be able to just press 4-5 keys on the keyboard and navigate to a file deterministically without having to check which folder it's in, etc. No big deal though |
The result is always 1 second. That seems wrong, it should be the time taken for 1 iteration right? |
That was by purpose actually. I trimmed the number of iterations per test separetly so that they all have about the same runtime. See 06356bc for another approach which is to "collect the iterations for a given time" instead of "measuring the time for a given number of iterations". What do you think? I adjusted the initial desctiption but still here is an example run:
|
Added
|
I'ts nice because it means you don't have to wait a long time for the slow operations. I prefer to additionally look at the ms (or nanoseconds) taken per run as a way to visualize the speed of something, as opposed to trying to increase the number of iterations. |
@mariano54 Added
|
Okay improved the logging a bit. I think thats it from me now, any other requests? Example:
|
a32c2bb
to
05686a5
Compare
05686a5
to
0ad521e
Compare
wasn't, but now.. :
|
Looks really good now. |
Implements some benchmarks for streamable object creation, byte conversions and json conversions for the classes
FullBlock
andBenchmarkClass
. TheBenchmarkClass
can probably still be improved so im open for suggestions :) The benchmark collects iterations over a specific time window and this can be done multiple runs to get an average result. See the parameter below:Usage
Example run
Benchmark classes